//package com.sinothk.special.im.controller;
//
//import com.sinothk.base.version.domain.vo.SearchCommVO;
//import com.sinothk.special.im.entity.MsgLatest;
//import com.sinothk.special.im.entity.MsgLatestVO;
//import com.sinothk.special.im.service.IMsgLatestService;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import lombok.extern.slf4j.Slf4j;
//import org.jeecg.common.api.vo.Result;
//import org.jeecg.common.aspect.annotation.AutoLog;
//import org.jeecg.common.system.base.controller.JeecgController;
//import org.springframework.web.bind.annotation.*;
//
///**
// * @Description: 消息中心-最新消息
// * @Author: Liangyt
// * @Date: 2022-01-24
// * @Version: V1.0
// */
//@Api(tags = "消息中心-最新消息")
//@RestController
//@RequestMapping("/msgCenter/msgLatest")
//@Slf4j
//public class MsgLatestController extends JeecgController<MsgLatest, IMsgLatestService> {
//
//    private final IMsgLatestService msgLatestService;
//
//    public MsgLatestController(IMsgLatestService msgLatestService) {
//        this.msgLatestService = msgLatestService;
//    }
//
////    /**
////     * 分页列表查询
////     *
////     * @param msgLatest
////     * @param pageNo
////     * @param pageSize
////     * @param req
////     * @return
////     */
////    @AutoLog(value = "消息中心-最新消息-分页列表查询")
////    @ApiOperation(value = "最新消息-分页列表查询", notes = "最新消息-分页列表查询")
////    @GetMapping(value = "/list")
////    public Result<?> queryPageList(
////            MsgLatest msgLatest,
////            @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
////            @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
////            HttpServletRequest req) {
////        QueryWrapper<MsgLatest> queryWrapper = QueryGenerator.initQueryWrapper(msgLatest, req.getParameterMap());
////        Page<MsgLatest> page = new Page<MsgLatest>(pageNo, pageSize);
////        IPage<MsgLatest> pageList = msgLatestService.page(page, queryWrapper);
////        return Result.OK(pageList);
////    }
//
//    @AutoLog(value = "消息中心-最新消息-用户消息分页列表")
//    @ApiOperation(value = "最新消息-用户消息分页列表", notes = "最新消息-用户消息分页列表")
//    @GetMapping(value = "/listForLoginUser")
//    public Result<?> listForLoginUser(
//            SearchCommVO searchVo,
//            @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
//            @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
//        return Result.OK(msgLatestService.listForLoginUser(searchVo, pageNo, pageSize));
//    }
//
//    /**
//     * 添加
//     *
//     * @param vo
//     * @return
//     */
//    @AutoLog(value = "消息中心-最新消息-添加")
//    @ApiOperation(value = "最新消息-添加", notes = "最新消息-添加")
//    @PostMapping(value = "/add")
//    public Result<?> add(@RequestBody MsgLatestVO vo) {
//        msgLatestService.saveData(vo);
//        return Result.OK("添加成功！");
//    }
//
//    /**
//     * 通过id删除
//     *
//     * @param id
//     * @return
//     */
//    @AutoLog(value = "消息中心-最新消息-通过id删除")
//    @ApiOperation(value = "最新消息-通过id删除", notes = "最新消息-通过id删除")
//    @DeleteMapping(value = "/delete")
//    public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
//        msgLatestService.removeById(id);
//        return Result.OK("删除成功!");
//    }
//
////    /**
////     * 通过id查询
////     *
////     * @param id
////     * @return
////     */
////    @AutoLog(value = "消息中心-最新消息-通过id查询")
////    @ApiOperation(value = "最新消息-通过id查询", notes = "最新消息-通过id查询")
////    @GetMapping(value = "/queryById")
////    public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
////        MsgLatest msgLatest = msgLatestService.getById(id);
////        if (msgLatest == null) {
////            return Result.error("未找到对应数据");
////        }
////        return Result.OK(msgLatest);
////    }
//}
